package org.tloss.web.editor.model;

import java.util.List;

import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementWrapper;
import javax.xml.bind.annotation.XmlRootElement;

import org.tloss.web.editor.form.editors.BodyProvider;
import org.tloss.web.editor.model.command.Body;

@XmlRootElement
public class Form implements BodyProvider {
	private List<FormField> formFields;
	private Body body = new Body();
	private List<Submit> submits;
	

	@XmlElement
	public Body getBody() {
		return body;
	}

	public void setBody(Body body) {
		this.body = body;
	}
	@XmlElementWrapper(name="submits")
	@XmlElement(name = "submit")
	public List<Submit> getSubmits() {
		
		return submits;
	}
	public void setSubmits(List<Submit> submits) {
		this.submits = submits;
	}

	@XmlElementWrapper(name = "fields")
	@XmlElement(name = "field")
	public List<FormField> getFormFields() {
		return formFields;
	}

	public void setFormFields(List<FormField> formFields) {
		this.formFields = formFields;
	}
}
